<%--
  User: Shengzhao Li
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="form" uri="http://www.springframework.org/tags/form" %>
<html>
<head>
    <title>注册</title>

</head>
<body>

<%--register page--%>
<div id="register_page" data-role="page" data-title="注册" class="page">
    <div data-role="header" data-theme="f">
        <a href="${contextPath}/m/dashboard" data-icon="home" data-direction="reverse"
           data-transition="slide">主页</a>

        <h1>注册</h1>
    </div>
    <div data-role="content">
        <form:form commandName="registerUserDTO" id="register_form">
            <div data-role="collapsible" data-collapsed="false" data-theme="a" data-content-theme="c">
                <h3>登录信息</h3>
                <ul data-role="listview" data-inset="true">
                    <li>
                        <div data-role="fieldcontain">
                            <label for="email">邮箱:</label>
                            <input type="email" name="email" id="email" value="${registerUserDTO.email}"
                                   placeholder="邮箱"
                                   required/>
                            <span class="red">*</span>
                            <form:errors path="email" cssClass="form_error"/>
                        </div>
                    </li>
                    <li>
                        <div data-role="fieldcontain">
                            <label for="password">密码:</label>
                            <input type="password" name="password" id="password" value="${registerUserDTO.password}"
                                   placeholder="密码(至少8位)" required/>
                            <span class="red">*</span>
                            <form:errors path="password" cssClass="form_error"/>
                        </div>
                        <div data-role="fieldcontain">
                            <label for="re_password">确认密码:</label>
                            <input type="password" name="rePassword" id="re_password"
                                   value="${registerUserDTO.rePassword}"
                                   placeholder="确认密码" required/>
                            <span class="red">*</span>
                            <form:errors path="rePassword" cssClass="form_error"/>
                        </div>
                    </li>
                </ul>
            </div>

            <div data-role="collapsible" data-collapsed="true" data-theme="a" data-content-theme="c">
                <h3>可选信息</h3>
                <ul data-role="listview" data-inset="true">
                    <li>
                        <div data-role="fieldcontain">
                            <label for="nick_name">呢称:</label>
                            <input type="text" name="nickName" id="nick_name" value="${registerUserDTO.nickName}"
                                   placeholder="呢称"/>
                        </div>
                    </li>
                    <li>
                        <div data-role="fieldcontain">
                            <label for="cell_phone">手机:</label>
                            <input type="text" name="cellPhone" id="cell_phone" value="${registerUserDTO.cellPhone}"
                                   placeholder="手机"/>
                            <form:errors path="cellPhone" cssClass="form_error"/>
                        </div>
                    </li>
                    <li>
                        <div data-role="fieldcontain">
                            <label for="city">城市:</label>
                            <input type="text" name="city" id="city" value="${registerUserDTO.city}" placeholder="城市"/>
                        </div>
                    </li>
                </ul>
            </div>
            <div data-role="fieldcontain">
                <button type="submit" data-theme="b">注册</button>
            </div>
        </form:form>
    </div>
</div>
</body>
</html>